﻿CREATE PROCEDURE [ArticleLikes_insert]
	@P_1 Int,
	@P_2 Int,
	@P_3 Bit,
	@P_4 Int,
	@P_5 DateTime,
	@sync_row_count Int OUTPUT
AS
BEGIN
SET @sync_row_count = 0; IF NOT EXISTS (SELECT * FROM [ArticleLikes_tracking] WHERE [ArticleLikeID] = @P_1) BEGIN SET IDENTITY_INSERT [ArticleLikes] ON; INSERT INTO [ArticleLikes]([ArticleLikeID], [ArticleID], [Liked], [UserID], [DateStamp]) VALUES (@P_1, @P_2, @P_3, @P_4, @P_5);  SET @sync_row_count = @@rowcount; SET IDENTITY_INSERT [ArticleLikes] OFF; END 
END